/* Hero Section */
.hero-section {
    width: 100%;
    background: linear-gradient(135deg, #f5f7fa, #e4e7eb);
    padding: 20px 0;
    margin-bottom: 40px;
}

/* 轮播图容器 */
.carousel {
    position: relative;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.carousel-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

/* 轮播图片样式 */
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.5s ease-in-out;
    background-color: #fff;
}

.carousel-slide.active {
    opacity: 1;
    transform: scale(1);
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 轮播图文本内容 */
.carousel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    /* background: linear-gradient(transparent, rgba(0, 0, 0, 0.7)); */
    color: rgb(8, 6, 6);
    text-align: center;
    /* 初始状态隐藏 */
    /* opacity: 0; */
    /* visibility: visible; */
    /* transition: opacity 0.3s ease, visibility 0.3s ease;  */
    /* 确保层级关系正确 */
    z-index: 1;
}



.carousel-content h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 12px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.carousel-content p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
    /* text-shadow: 1px 1px 2px rgba(237, 231, 231, 0.3); */
    color: #f6f3f3;
    opacity: 0.9;
   /* ...其他样式保持不变... */
    visibility: visible;
    transition: opacity 0.3s ease;
}
/* 鼠标悬停时显示 */
.carousel-container:hover .carousel-content p {
    visibility: visible;
    opacity: 1;
}

/* 轮播图控制按钮 */
.prev,
.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
}

.carousel:hover .prev,
.carousel:hover .next {
    opacity: 1;
}

.prev {
    left: calc(200px + 20px); 
}

.next {
    right: 20px;
}

.prev:hover,
.next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

/* 轮播图指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 30px; /* 向上移动，避免被导航栏覆盖 */
    left: calc(50% + 10px); /* 假设导航栏影响了居中对齐，可以适当调整 */
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid white;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-indicator.active {
    background: white;
    transform: scale(1.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .carousel {
        height: 300px;
    }

    .carousel-content h2 {
        font-size: 1.5rem;
    }

    .carousel-content p {
        font-size: 1rem;
    }

    .prev,
    .next {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


.carousel-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    /* padding: 20px 0; */
    z-index: 2;
}
/* 让导航列表均分高度 */
.carousel-nav ul {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    margin: 0;
}

.carousel-nav ul li {
    flex: 1; /* 每个 <li> 平均分配父容器高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    list-style: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.carousel-nav ul li:last-child {
    border-bottom: none;
}

.carousel-nav ul li .sub-menu {
    display: none; /* 默认不显示 */
    flex-direction: column; /* 子菜单垂直排列 */
    position: absolute; /* 使子菜单绝对定位，不影响其他元素布局 */
    width: 100%; /* 子菜单宽度与父元素相同 */
    background-color: rgba(0, 0, 0, 0.9); /* 背景稍微透明 */
    top: 100%; /* 位于父元素的底部 */
    left: 0;
}

.carousel-nav ul li:hover .sub-menu {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s ease;
    display: block; /* 悬浮时显示 */
}

.carousel-nav ul li a,
.carousel-nav ul li .sub-menu a {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s ease;
    padding: 10px 0;
    border-radius: 2px;
    width: 100%;
}

.carousel-nav ul li a:hover,
.carousel-nav ul li .sub-menu a:hover {
    background-color: #555;
}


/* 通用图标样式，确保图标和文本竖直居中对齐 */
a>.iconfont {
    vertical-align: middle;
    margin-right: 10px;
    /* 图标和文本之间的间距 */
}

/* 确保链接文本左对齐 */
a {
    /* display: flex;
    align-items: center;
    text-align: left;
    color: black; */
    text-decoration: none;
}

/* 子菜单样式 */
.sub-menu {
    display: none;
    /* 默认不显示 */
    position: absolute;
    /* 绝对定位 */
    left: 100%;
    /* 从父元素的右侧开始 */
    top: 0;
    /* 与父元素顶部对齐 */
    background-color: #f0f0f0;
    /* 背景颜色 */
    border: 1px solid #ccc;
    /* 边框 */
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    /* 阴影效果 */
    padding: 10px;
    /* 内边距 */
    width: 200px;
    /* 宽度 */
    z-index: 1000;
    /* z-index 确保子菜单在其他内容之上 */
}

/* 当鼠标悬停在父级链接上时显示子菜单 */
li:hover>.sub-menu {
    display: block;
    /* 显示子菜单 */
}